import { fileURLToPath, URL } from 'node:url'

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import setupPlugins from "./vite/plugins/index"
// import vueSetupExtend from 'vite-plugin-vue-setup-extend'

// https://vitejs.dev/config/
export default defineConfig(({ command  }) => {
  const isBuild = (command=='build')?true:false;

  return {
      plugins: [
        vue(),
        ...setupPlugins(isBuild)
      ],
       resolve:{
         alias:{
           '@': fileURLToPath(new URL('./src', import.meta.url))
         }
       }
    }})
